import http from "@/utils/http";
import {YN_STREAM} from "@/common/const";

/**
 * 公司新闻详情
 * @param newId              新闻ID
 * @param stockId            股票ID
 * @param kcType             1.非科创版 2.科创板
 * @returns {*}
 */
export const getDetail = ({newId = '',stockId = '',kcType = ''}) => {
	return  http.get(`${YN_STREAM}/gw/ynstream/stream/info/client/new/detail`,{
		newId,stockId,kcType
	},true);
};

/**
 * 研究报告详情
 * @param reportId       研究ID
 * @param stockId            股票ID
 * @param kcType             1.非科创版 2.科创板
 * @returns {*}
 */
export const getReport =({newId = '',stockId = '',kcType = ''})=>{
    return http.get(`${YN_STREAM}/gw/ynstream/api/client/report/detail`,{
		reportId:newId,stockId,kcType
    },true);
};

/**
 * 公司大事
 * http://gw.zx093.cn/ynstockinfo/client/info/detail?infoType=2&infoId=00000000000010ro81
 * @param url          接口URL地址
 * @returns {*}
 */
export const getInfo = (url = '')=>{
    return http.get(url);
};



/**
 * 公司公告
 * http://gw.zx093.cn/gw/ynstream/api/client/notice/detail?noticeId=25045881
 * @param noticeId               seqID
 * @param stockId            股票ID
 * @param kcType             1.非科创版 2.科创板
 * @returns {*}
 */
export const getNotice = ({newId = '',stockId = '',kcType = ''})=>{
   return http.get(`${YN_STREAM}/gw/ynstream/api/client/notice/detail`,{
	   noticeId:newId,stockId,kcType
   })
};



